package com.trip.wechat.platform.web.dto;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.google.common.base.MoreObjects;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 功能说明: 简单消息 - 明文结构<br>
 * 系统说明: <br>
 * 模块说明: <br>
 * 功能描述: <br>
 */
@XmlRootElement(name = "xml")
public class SimpleMessageDTO {

    @XmlElement(name = "ToUserName")
    @JacksonXmlProperty(localName = "ToUserName")
    private String toUserName;
    @XmlElement(name = "FromUserName")
    @JacksonXmlProperty(localName = "FromUserName")
    private String fromUserName;
    @XmlElement(name = "CreateTime")
    @JacksonXmlProperty(localName = "CreateTime")
    private String createTime;
    @XmlElement(name = "MsgType")
    @JacksonXmlProperty(localName = "MsgType")
    private String msgType;

    // 接收事件推送
    @XmlElement(name = "Event")
    @JacksonXmlProperty(localName = "Event")
    private String event;
    @XmlElement(name = "EventKey")
    @JacksonXmlProperty(localName = "EventKey")
    private String eventKey;
    @XmlElement(name = "Status")
    @JacksonXmlProperty(localName = "Status")
    private String status;
    @XmlElement(name = "Ticket")
    @JacksonXmlProperty(localName = "Ticket")
    private String ticket;
    @XmlElement(name = "Latitude")
    @JacksonXmlProperty(localName = "Latitude")
    private String latitude;
    @XmlElement(name = "Longitude")
    @JacksonXmlProperty(localName = "Longitude")
    private String longitude;
    @XmlElement(name = "Precision")
    @JacksonXmlProperty(localName = "Precision")
    private String precision;

    // 文本消息
    @XmlElement(name = "MsgId")
    @JacksonXmlProperty(localName = "MsgId")
    private String msgId;
    @XmlElement(name = "Content")
    @JacksonXmlProperty(localName = "Content")
    private String content;

    // 语音消息
    @XmlElement(name = "MediaId")
    @JacksonXmlProperty(localName = "MediaId")
    private String mediaId;
    @XmlElement(name = "Format")
    @JacksonXmlProperty(localName = "Format")
    private String format;


    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public String getEventKey() {
        return eventKey;
    }

    public void setEventKey(String eventKey) {
        this.eventKey = eventKey;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getPrecision() {
        return precision;
    }

    public void setPrecision(String precision) {
        this.precision = precision;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("toUserName", toUserName)
                .add("fromUserName", fromUserName)
                .add("createTime", createTime)
                .add("msgType", msgType)
                .add("event", event)
                .add("eventKey", eventKey)
                .add("ticket", ticket)
                .add("latitude", latitude)
                .add("longitude", longitude)
                .add("precision", precision)
                .add("msgId", msgId)
                .add("content", content)
                .add("mediaId", mediaId)
                .add("format", format)
                .toString();
    }
}
